package com.jushu.storbox.callback;


/**
 * @param <RequestDataType> the procced data type
 */
public interface ITCallback<RequestDataType, ResponseDataType> {

	public void onStart(RequestDataType procData);

	/**
	 * @param procData the date current procced
	 * @param progress the percent of total
	 * @param proccedSize current procced total size
	 * @param sizeByThis a buffer size procced by this time
	 */
	public void onProgress(RequestDataType procData, int progress, long proccedSize, long sizeByThis);

	public void onSuccess(RequestDataType procData, ResponseDataType response);

	public void onFailure(RequestDataType procData, Throwable t);

}
